<template>
	<view class="goods_num">
		<view class="goods_img">
			<image :src="item.image" mode=""></image>
		</view>
		<view class="goods_detail">
			<view class="goods_title">
				{{item.commodityName}}
			</view>
			<view class="good_price">
				<view class="price">
					￥{{item.specificationPrice ? item.specificationPrice : item.list[0].specificationPrice}}
				</view>
				<view class="old_price" v-if="oldprice">
					￥{{item.priceOriginally ? item.priceOriginally : item.list[0].priceOriginally}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "relevance-goods",
		data() {
			return {

			};
		},
		props: ['oldprice', 'item']
	}
</script>

<style lang="scss">
	.goods_num {
		display: flex;

		.goods_img {
			width: 200rpx;
			height: 200rpx;

			image {
				width: 100%;
				height: 100%;
			}

		}

		.goods_detail {
			padding: 30rpx 0;
			margin-left: 20rpx;
			// width: 396rpx;
			flex: 1;
		}

		.goods_title {
			font-size: 26rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 800;
			height: 106rpx;
			color: #333332;
		}

		.good_price {
			font-size: 24rpx;
			display: flex;
			justify-content: flex-start;
			color: #F44236;
			font-size: 32rpx;

			.old_price {
				padding-left: 20rpx;
				padding-top: 6rpx;
				font-size: 26rpx;
				color: #777777;
				text-decoration: line-through;
			}

			.num {
				color: #777;
			}
		}

	}
</style>